package com.example.jiaowuchu.jiaowuSys.util;

import java.io.IOException;
import java.util.Properties;

public class PropertiesUtil {
    private static Properties p=null;

    static{
        try {
            p=new Properties();
            p.load(PropertiesUtil.class.getClassLoader().getResourceAsStream("jdbc.properties"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }


    public static  String getDriver(){
        return get("jdbc.driver");
    }

    public static String getURL(){
        return get("jdbc.url");
    }

    public static String getUser(){
        return get("jdbc.user");
    }

    public static String getPwd(){
        return get("jdbc.pwd");
    }

    public static String  get(String key){
        return  (String) p.get(key);
    }
}
